using MoonFramework;
using Sirenix.OdinInspector;
using UnityEngine;

namespace Data
{
    public struct TimeStateData
    {
        //持续时间
        public float durationTime;
        //阳光强度
        public float sunIntensity;
        //阳光颜色
        public Color sunColor;
        public AudioClip BgAudioClip; //背景音乐

        //太阳的角度
        [OnValueChanged(nameof(SetRotation))]
        public Vector3 sunRotation;
        [HideInInspector]
        public Quaternion sunQuaternion;

        private void SetRotation()
        {
            sunQuaternion = Quaternion.Euler(sunRotation);
        }
    }
    
    public struct TimeData
    {
        public string curState;
        public float curTime;
        public int curDay;

        public TimeData(TimeDataPro timeDataPro)
        {
            this.curDay = timeDataPro.CurDay;
            this.curState = timeDataPro.CurState;
            this.curTime = timeDataPro.CurTime;
        }
    }
}